<script>
//缩略图
var thumbUploader = KindEditor.editor({
    allowFileManager: true,
    uploadJson: '{:U('
    Attachment / uploadJson ')}', //更改默认的上传控件
    fileManagerJson: '{:U('
    Attachment / fileManagerJson ')}', //更改默认的空间控件
});

function flashupload(uploadid, name, textareaid, funcName, args, module, catid, authkey) {
    thumbUploader.loadPlugin('image', function() {
        thumbUploader.plugin.imageDialog({
            imageUrl: KindEditor('#' + textareaid).val(),
            clickFn: function(url, title, width, height, border, align) {
                if (funcName) {
                    funcName(uploadid, textareaid, url);
                } else {

                }
                // KindEditor('#thumb').val(url);
                // $('#thumb_preview').attr("src", url);
                thumbUploader.hideDialog();
            }

        });
    });
}

function preview(uploadid, returnid, url) {
    $('#' + returnid).val(url);
    $('#' + returnid + '_s').attr('src', url);
}
</script>
<div class="bjui-pageContent">
    <form action="{:U('Article/positionItemEdit',['posid' => $Detail['posid'], 'modelid' => $Detail['modelid'], 'id' => $Detail['id']])}" id="j_custom_form" data-toggle="validate" data-alertmsg="false">
        <div style="margin:15px auto 0;">
            <fieldset>
                <legend>基本信息</legend>
                <!-- Tab panes -->
                <div class="">
                    <div class="tab-pane fade active in" id="tab_setting_1">
                        <table class="table table-condensed table-hover" width="100%">
                            <tbody>
                                <tr>
                                    <td>
                                        <label for="c_name" class="control-label x85">标题：</label>
                                        <input type="text" id="c_name" name="info[title]" value="{$Detail.data.title}" data-rule="required" size="15" class="required">
                                    </td>
                                </tr>
                                <tr>
                                    <td>
                                        <label for="c_name" class="control-label x85">
                                            <?php echo L('posid_inputtime')?>：</label>
                                        <input type="text" data-toggle="datepicker" name="info[inputtime]" value="{$Detail.data.inputtime|date="Y-m-d H:i:s", ###}">
                                    </td>
                                </tr>
                                <tr>
                                    <td>
                                        <label for="c_name" class="control-label x85">
                                            <?php echo L('posid_desc')?>：</label>
                                        <textarea name="info[description]" id="j_custom_note" data-toggle="autoheight" cols="40" rows="1">{$Detail.data.description}</textarea>
                                    </td>
                                </tr>
                                <tr>
                                    <td>
                                        <label for="c_name" class="control-label x85"><?php echo L('posid_syn')?></label>

                                        <input name="synedit" data-toggle="icheck" value="0" type="radio" <?php echo $Detail['synedit']==0 ? 'checked="checked"' : ''?> data-label="<?php echo L('enable')?>">
                                        
                                        <input name="synedit" data-toggle="icheck" value="1" type="radio" <?php echo $Detail['synedit']==1 ? 'checked="checked"' : ''?> data-label="<?php echo L('close')?>">
                                        
                                    </td>
                                </tr>
                            </tbody>
                        </table>
                    </div>
                </div>
            </fieldset>
        </div>
    </form>
</div>
<div class="bjui-pageFooter">
    <ul>
        <li>
            <button type="button" class="btn-close" data-icon="close">取消</button>
        </li>
        <li>
            <button type="submit" class="btn-default" data-icon="save">保存</button>
        </li>
    </ul>
</div>